﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace T.FAS.Runtime.MF.Entity
{
    // 节点基类
    public abstract class NodeBase : ShapeBase
    {
        [JsonProperty("position")]
        public Position Position { get; set; }

        [JsonProperty("size")]
        public Size Size { get; set; }

        [JsonProperty("view")]
        public string View { get; set; }

        [JsonProperty("data")]
        public object Data { get; set; } // 由具体节点类型重写
        /// <summary>
        /// 设计时的
        /// </summary>
        public Dictionary<string, Object> DesignerMeta
        {
            get
            {
                var meta = new Dictionary<string, object>();
                meta.Add("designer", new { position = Position, size = Size });
                return meta;
            }
        }
    }
}
